'''
Created on 2009-4-17

@author: Administrator
'''
import unittest
from com.carnation.common.util.test import testTools


class Test(unittest.TestCase):


    def testCreate(self):
        test = testTools(__file__) 
        rsp_msg = test.requestAndRsp(1, 'Run For Test ModelAttributeService.create', \
'''
ModelAttributeService.create
    MOIModel
        setName    "relationName"
        setDisplayName    "displayName"
        setAbstract    false
        setPackageId    "Package1=1"
    java.util.List
        0
            MOIAttribute
                setName    "name"
                setNotNull    true
                setDataType    "DT_STRING"
                setDefaultValue    null
        1
            MOIAttribute
                setName    "isNull"
                setNotNull    true
                setDataType    "DT_BOOLEAN"
''', \
'''
MOIModel
    getName    "relationName"
    getDisplayName    "displayName"
    isAbstract    false
    getPackageId    "Package1=1"
'''
)
#    print rsp_msg
        print '\nDone'
        test.quit()


if __name__ == "__main__":
    unittest.main()
